﻿Public Class ClassColArchives
    'Collection indexée de fragments de texte
    Inherits System.Collections.ObjectModel.KeyedCollection(Of String, ClassArchive)

    Protected Overrides Function GetKeyForItem(ByVal item As ClassArchive) As String
        If Trim(item.CheminFichier) <> "" Then
            Return item.CheminFichier
        Else
            Return item.TitreFichier
        End If
    End Function

    Friend Overloads Sub add(ByVal Key As String, ByRef Item As ClassArchive)
        If Not Me.Contains(Key) Then
            Me.add(Item)
        End If
    End Sub
End Class
